hip.util.string

Undocumented in source.

Public Imports

hip.util.to_string_range
public import hip.util.to_string_range;
Undocumented in source.

Members

Aliases

BigString
alias BigString = StringBuffer!(8192)
Undocumented in source.
PathString
alias PathString = StringBuffer!(2048)
Undocumented in source.
SmallString
alias SmallString = StringBuffer!(256)
Undocumented in source.
countUntil
alias countUntil = indexOf
Undocumented in source.

Functions

after
string after(string str, string afterWhat)

Same thing as startsWith, but returns the part after the afterWhat

between
inout(string) between(string str, string left, string right, int start)

Returns the content that is between left and right:

count
int count(string str, string countWhat)
Undocumented in source. Be warned that the author may not have intended to support it.
findAfter
inout(string) findAfter(string str, string afterWhat, int startIndex)
Undocumented in source. Be warned that the author may not have intended to support it.
fromStringz
string fromStringz(char* cstr)
Undocumented in source. Be warned that the author may not have intended to support it.
getNumericEnding
string getNumericEnding(string s)

This function will get the number at the end of the string. Used when you have numbered items such as frames: walk_01, walk_02, etc

indexOf
int indexOf(String str, char[] toFind, int startIndex)
Undocumented in source. Be warned that the author may not have intended to support it.
indexOf
int indexOf(char[] str, char[] toFind, int startIndex)
Undocumented in source. Be warned that the author may not have intended to support it.
indexOf
int indexOf(string str, char ch, int startIndex)
Undocumented in source. Be warned that the author may not have intended to support it.
isAlpha
bool isAlpha(TChar c)
Undocumented in source. Be warned that the author may not have intended to support it.
isEndOfLine
bool isEndOfLine(TChar c)
Undocumented in source. Be warned that the author may not have intended to support it.
isLowercase
bool isLowercase(TChar c)
Undocumented in source. Be warned that the author may not have intended to support it.
isNumber
bool isNumber(string str)
Undocumented in source. Be warned that the author may not have intended to support it.
isNumeric
bool isNumeric(TChar c)
Undocumented in source. Be warned that the author may not have intended to support it.
isUpperCase
bool isUpperCase(TChar c)
Undocumented in source. Be warned that the author may not have intended to support it.
isWhitespace
bool isWhitespace(TChar c)
Undocumented in source. Be warned that the author may not have intended to support it.
join
string join(string[] args, string separator)
Undocumented in source. Be warned that the author may not have intended to support it.
lastIndexOf
int lastIndexOf(string str, string toFind, int startIndex)
Undocumented in source. Be warned that the author may not have intended to support it.
lastIndexOf
int lastIndexOf(string str, char ch, int startIndex)
Undocumented in source. Be warned that the author may not have intended to support it.
limitDecimalPlaces
string limitDecimalPlaces(string input, ubyte decimalPlaces)

Returns the entire string if input is not a number separated by a '.'

repeat
string repeat(string str, size_t repeatQuant)
Undocumented in source. Be warned that the author may not have intended to support it.
replaceAll
string replaceAll(string str, char what, string replaceWith)
Undocumented in source. Be warned that the author may not have intended to support it.
replaceAll
string replaceAll(string str, string what, string replaceWith)
Undocumented in source. Be warned that the author may not have intended to support it.
split
string[] split(string str, char separator)
Undocumented in source. Be warned that the author may not have intended to support it.
split
string[] split(string str, string separator)
Undocumented in source. Be warned that the author may not have intended to support it.
splitRange
auto splitRange(TString str, TStrSep separator)
Undocumented in source. Be warned that the author may not have intended to support it.
startsWith
bool startsWith(string str, string withWhat)
Undocumented in source. Be warned that the author may not have intended to support it.
to (from hip.util.conv)
TO to(FROM f) via public import hip.util.conv : to;
Undocumented in source.
toDefault
T toDefault(string s, T defaultValue)
Undocumented in source. Be warned that the author may not have intended to support it.
toLowerCase
char toLowerCase(char c)
Undocumented in source. Be warned that the author may not have intended to support it.
toLowerCase
string toLowerCase(string str)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString(string s)
Undocumented in source. Be warned that the author may not have intended to support it.
toStringz
const(char)* toStringz(string str)
Undocumented in source. Be warned that the author may not have intended to support it.
toUTF32
dstring toUTF32(string encoded)
Undocumented in source. Be warned that the author may not have intended to support it.
toUpper
char toUpper(char c)
Undocumented in source. Be warned that the author may not have intended to support it.
toUpper
string toUpper(string str)
Undocumented in source. Be warned that the author may not have intended to support it.
trim
string trim(string str)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

String
struct String

RefCounted, @nogc string, OutputRange compatible,

StringBuffer
struct StringBuffer(size_t capacity)

Creates a stack string. This does not use any heap allocation. Prefer using that one inside game loop

StringBuilder
struct StringBuilder
Undocumented in source.

Meta